package ui;

import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

import model.MessageType;

public class MessageButtons extends JPanel {

	MessageType t;
	public MessageType getT()
	{
		return t;
	}
	public void setT(MessageType t)
	{
		this.t = t;
	}
	public MessageButtons (MessageType t) {

		setT(t);
		setLayout(new FlowLayout());
		//this.setPreferredSize(preferredSize);

		switch(t)
		{
			case SYSTEM:
				break;
			case UNSOLVEDTASK:
				JButton btnMove = new JButton("Move");
				btnMove.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnMove);
				break;
			case EMPTYWAITINGLIST:
				break;
			case APPLICATION:
				JButton btnSend = new JButton("Send");
				btnSend.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnSend);
				JButton btnApr = new JButton("Aprove");
				btnApr.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnApr);
				JButton btnView = new JButton("View");
				btnView.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnView);
				break;
			case CUSTOM:
				JButton btnSch = new JButton("Schedule");
				btnSch.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnSch);
				break;
			case COMPLAINT:
				JButton btnSch2 = new JButton("Schedule");
				btnSch2.addActionListener(
						new ActionListener(){
							public void actionPerformed(ActionEvent event){
							
							}
						});
				setBackground(new Color(0f,0f,0f,0f));
				this.add(btnSch2);
				break;
			case UNDEFINED:
				break;
		}
		JButton btnX = new JButton("Delete");
		btnX.addActionListener(
				new ActionListener(){
					public void actionPerformed(ActionEvent event){
					
					}
				});
		setBackground(new Color(0f,0f,0f,0f));
		//setBackground(c);
		this.add(btnX);
	
	}
	

}